package demo07

/**
 * @author xiaoZhao
 * @date 2022/7/26
 * @describe 元组扩展
 */
object Test03_MathTupleExtend {
  def main(args: Array[String]): Unit = {
    // 1.在变量声明时匹配
    val (x,y) = (10,"hello")
    println(s"$x $y")
    val List(first,second,_*) = List(12,21,21,21,34)
    println(s"$first $second ")

    val fir :: sec :: res =List(12,21,34)
    println(s"$fir $sec $res")

    // 2.for推导式中进行模式匹配
    val list =List(("a,",12),("b",34),("c",45))

  }
}
